import echarts from 'echarts';
import ecStat from 'echarts-stat'
import axios from 'axios';
//散点图
var ddd = [
    [10.0, 8.04],
    [8.0, 6.95],
    [13.0, 7.58],
    [9.0, 8.81],
    [11.0, 8.33],
    [14.0, 9.96],
    [6.0, 7.24],
    [4.0, 4.26],
    [12.0, 10.84],
    [7.0, 4.82],
    [5.0, 5.68]
]
const scatterChartData = {
    textStyle:{

    },
    title:{
        text:"",
        left:"center",
        textStyle:{
            color:"#000"
        }
    },
    tooltip: {
        
    },
	xAxis: {
        axisLine:{
            lineStyle:{
               
            }
        } 
    },
	yAxis: {
        axisLine:{
            lineStyle:{
               
            }
        } 
    },
	series: [{
		symbolSize: 20,
		data: [
			[10.0, 8.04],
			[8.0, 6.95],
			[13.0, 7.58],
			[9.0, 8.81],
			[11.0, 8.33],
			[14.0, 9.96],
			[6.0, 7.24],
			[4.0, 4.26],
			[12.0, 10.84],
			[7.0, 4.82],
			[5.0, 5.68]
		],
        type: 'scatter',
    },
    ]
};
var data = [
    [[28604,77,17096869,'Australia',1990],[31163,77.4,27662440,'Canada',1990],[1516,68,1154605773,'China',1990],[13670,74.7,10582082,'Cuba',1990],[28599,75,4986705,'Finland',1990],[29476,77.1,56943299,'France',1990],[31476,75.4,78958237,'Germany',1990],[28666,78.1,254830,'Iceland',1990],[1777,57.7,870601776,'India',1990],[29550,79.1,122249285,'Japan',1990],[2076,67.9,20194354,'North Korea',1990],[12087,72,42972254,'South Korea',1990],[24021,75.4,3397534,'New Zealand',1990],[43296,76.8,4240375,'Norway',1990],[10088,70.8,38195258,'Poland',1990],[19349,69.6,147568552,'Russia',1990],[10670,67.3,53994605,'Turkey',1990],[26424,75.7,57110117,'United Kingdom',1990],[37062,75.4,252847810,'United States',1990]],
    [[44056,81.8,23968973,'Australia',2015],[43294,81.7,35939927,'Canada',2015],[13334,76.9,1376048943,'China',2015],[21291,78.5,11389562,'Cuba',2015],[38923,80.8,5503457,'Finland',2015],[37599,81.9,64395345,'France',2015],[44053,81.1,80688545,'Germany',2015],[42182,82.8,329425,'Iceland',2015],[5903,66.8,1311050527,'India',2015],[36162,83.5,126573481,'Japan',2015],[1390,71.4,25155317,'North Korea',2015],[34644,80.7,50293439,'South Korea',2015],[34186,80.6,4528526,'New Zealand',2015],[64304,81.6,5210967,'Norway',2015],[24787,77.3,38611794,'Poland',2015],[23038,73.13,143456918,'Russia',2015],[19360,76.5,78665830,'Turkey',2015],[38225,81.4,64715810,'United Kingdom',2015],[53354,79.1,321773631,'United States',2015]]
];
const scatterChartData2 = {
    textStyle:{

    },
    tooltip: {
       
    },
	backgroundColor: new echarts.graphic.RadialGradient(0.3, 0.3, 0.8, [{
        offset: 0,
        color: '#f7f8fa'
    }, {
        offset: 1,
        color: '#cdd0d5'
    }]),
    title: {
        text: '1990 与 2015 年各国家人均寿命与 GDP',
        left:"center",
        top:"20px",
        textStyle:{
            color:"#000"
        }
    },
    legend: {
        data: ['1990', '2015'],
        textStyle:{}
    },
    xAxis: {
        splitLine: {
            lineStyle: {
                type: 'dashed'
            }
        },
        axisLine:{
            lineStyle:{
               
            }
        } 
    },
    yAxis: {
        splitLine: {
            lineStyle: {
                type: 'dashed'
            }
        },
        scale: true,
        axisLine:{
            lineStyle:{
               
            }
        } 
    },
    series: [{
        name: '1990',
        data: data[0],
        type: 'scatter',
        symbolSize: function (data) {
            return Math.sqrt(data[2]) / 5e2;
        },
        emphasis: {
            label: {
                show: true,
                formatter: function (param) {
                    return param.data[3];
                },
                position: 'top'
            }
        },
        itemStyle: {
            shadowBlur: 10,
            shadowColor: 'rgba(120, 36, 50, 0.5)',
            shadowOffsetY: 5,
            color: new echarts.graphic.RadialGradient(0.4, 0.3, 1, [{
                offset: 0,
                color: 'rgb(251, 118, 123)'
            }, {
                offset: 1,
                color: 'rgb(204, 46, 72)'
            }])
        }
    }, {
        name: '2015',
        data: data[1],
        type: 'scatter',
        symbolSize: function (data) {
            return Math.sqrt(data[2]) / 5e2;
        },
        emphasis: {
            label: {
                show: true,
                formatter: function (param) {
                    return param.data[3];
                },
                position: 'top'
            }
        },
        itemStyle: {
            shadowBlur: 10,
            shadowColor: 'rgba(25, 100, 150, 0.5)',
            shadowOffsetY: 5,
            color: new echarts.graphic.RadialGradient(0.4, 0.3, 1, [{
                offset: 0,
                color: 'rgb(129, 227, 238)'
            }, {
                offset: 1,
                color: 'rgb(25, 183, 207)'
            }])
        }
    }]
};
const scatterChartData3 = {
    textStyle:{

    },
    tooltip: {
        
    },
    title:{
        text:"",
        left:"center",
        textStyle:{
            color:"#000"
        }
    },
	xAxis: {
        scale: true,
        axisLine:{
            lineStyle:{
               
            }
        } 
    },
    yAxis: {
        scale: true,
        axisLine:{
            lineStyle:{
               
            }
        } 
    },
    series: [{
        type: 'effectScatter',
        symbolSize: 20,
        data: [
            [172.7, 105.2],
            [153.4, 42]
        ]
    }, {
        type: 'scatter',
        data: [[161.2, 51.6], [167.5, 59.0], [159.5, 49.2], [157.0, 63.0], [155.8, 53.6],
            [170.0, 59.0], [159.1, 47.6], [166.0, 69.8], [176.2, 66.8], [160.2, 75.2],
            [172.5, 55.2], [170.9, 54.2], [172.9, 62.5], [153.4, 42.0], [160.0, 50.0],
            [147.2, 49.8], [168.2, 49.2], [175.0, 73.2], [157.0, 47.8], [167.6, 68.8],
            [159.5, 50.6], [175.0, 82.5], [166.8, 57.2], [176.5, 87.8], [170.2, 72.8],
            [174.0, 54.5], [173.0, 59.8], [179.9, 67.3], [170.5, 67.8], [160.0, 47.0],
            [154.4, 46.2], [162.0, 55.0], [176.5, 83.0], [160.0, 54.4], [152.0, 45.8],
            [162.1, 53.6], [170.0, 73.2], [160.2, 52.1], [161.3, 67.9], [166.4, 56.6],
            [168.9, 62.3], [163.8, 58.5], [167.6, 54.5], [160.0, 50.2], [161.3, 60.3],
            [167.6, 58.3], [165.1, 56.2], [160.0, 50.2], [170.0, 72.9], [157.5, 59.8],
            [167.6, 61.0], [160.7, 69.1], [163.2, 55.9], [152.4, 46.5], [157.5, 54.3],
            [168.3, 54.8], [180.3, 60.7], [165.5, 60.0], [165.0, 62.0], [164.5, 60.3],
            [156.0, 52.7], [160.0, 74.3], [163.0, 62.0], [165.7, 73.1], [161.0, 80.0],
            [162.0, 54.7], [166.0, 53.2], [174.0, 75.7], [172.7, 61.1], [167.6, 55.7],
            [151.1, 48.7], [164.5, 52.3], [163.5, 50.0], [152.0, 59.3], [169.0, 62.5],
            [164.0, 55.7], [161.2, 54.8], [155.0, 45.9], [170.0, 70.6], [176.2, 67.2],
            [170.0, 69.4], [162.5, 58.2], [170.3, 64.8], [164.1, 71.6], [169.5, 52.8],
            [163.2, 59.8], [154.5, 49.0], [159.8, 50.0], [173.2, 69.2], [170.0, 55.9],
            [161.4, 63.4], [169.0, 58.2], [166.2, 58.6], [159.4, 45.7], [162.5, 52.2],
            [159.0, 48.6], [162.8, 57.8], [159.0, 55.6], [179.8, 66.8], [162.9, 59.4],
            [161.0, 53.6], [151.1, 73.2], [168.2, 53.4], [168.9, 69.0], [173.2, 58.4],
            [171.8, 56.2], [178.0, 70.6], [164.3, 59.8], [163.0, 72.0], [168.5, 65.2],
            [166.8, 56.6], [172.7, 105.2], [163.5, 51.8], [169.4, 63.4], [167.8, 59.0],
            [159.5, 47.6], [167.6, 63.0], [161.2, 55.2], [160.0, 45.0], [163.2, 54.0],
            [162.2, 50.2], [161.3, 60.2], [149.5, 44.8], [157.5, 58.8], [163.2, 56.4],
            [172.7, 62.0], [155.0, 49.2], [156.5, 67.2], [164.0, 53.8], [160.9, 54.4],
            [162.8, 58.0], [167.0, 59.8], [160.0, 54.8], [160.0, 43.2], [168.9, 60.5],
            [158.2, 46.4], [156.0, 64.4], [160.0, 48.8], [167.1, 62.2], [158.0, 55.5],
            [167.6, 57.8], [156.0, 54.6], [162.1, 59.2], [173.4, 52.7], [159.8, 53.2],
            [170.5, 64.5], [159.2, 51.8], [157.5, 56.0], [161.3, 63.6], [162.6, 63.2],
            [160.0, 59.5], [168.9, 56.8], [165.1, 64.1], [162.6, 50.0], [165.1, 72.3],
            [166.4, 55.0], [160.0, 55.9], [152.4, 60.4], [170.2, 69.1], [162.6, 84.5],
            [170.2, 55.9], [158.8, 55.5], [172.7, 69.5], [167.6, 76.4], [162.6, 61.4],
            [167.6, 65.9], [156.2, 58.6], [175.2, 66.8], [172.1, 56.6], [162.6, 58.6],
            [160.0, 55.9], [165.1, 59.1], [182.9, 81.8], [166.4, 70.7], [165.1, 56.8],
            [177.8, 60.0], [165.1, 58.2], [175.3, 72.7], [154.9, 54.1], [158.8, 49.1],
            [172.7, 75.9], [168.9, 55.0], [161.3, 57.3], [167.6, 55.0], [165.1, 65.5],
            [175.3, 65.5], [157.5, 48.6], [163.8, 58.6], [167.6, 63.6], [165.1, 55.2],
            [165.1, 62.7], [168.9, 56.6], [162.6, 53.9], [164.5, 63.2], [176.5, 73.6],
            [168.9, 62.0], [175.3, 63.6], [159.4, 53.2], [160.0, 53.4], [170.2, 55.0],
            [162.6, 70.5], [167.6, 54.5], [162.6, 54.5], [160.7, 55.9], [160.0, 59.0],
            [157.5, 63.6], [162.6, 54.5], [152.4, 47.3], [170.2, 67.7], [165.1, 80.9],
            [172.7, 70.5], [165.1, 60.9], [170.2, 63.6], [170.2, 54.5], [170.2, 59.1],
            [161.3, 70.5], [167.6, 52.7], [167.6, 62.7], [165.1, 86.3], [162.6, 66.4],
            [152.4, 67.3], [168.9, 63.0], [170.2, 73.6], [175.2, 62.3], [175.2, 57.7],
            [160.0, 55.4], [165.1, 104.1], [174.0, 55.5], [170.2, 77.3], [160.0, 80.5],
            [167.6, 64.5], [167.6, 72.3], [167.6, 61.4], [154.9, 58.2], [162.6, 81.8],
            [175.3, 63.6], [171.4, 53.4], [157.5, 54.5], [165.1, 53.6], [160.0, 60.0],
            [174.0, 73.6], [162.6, 61.4], [174.0, 55.5], [162.6, 63.6], [161.3, 60.9],
            [156.2, 60.0], [149.9, 46.8], [169.5, 57.3], [160.0, 64.1], [175.3, 63.6],
            [169.5, 67.3], [160.0, 75.5], [172.7, 68.2], [162.6, 61.4], [157.5, 76.8],
            [176.5, 71.8], [164.4, 55.5], [160.7, 48.6], [174.0, 66.4], [163.8, 67.3]
        ],
    }]
}

var data4 = [
    [1, 4862.4],
    [2, 5294.7],
    [3, 5934.5],
    [4, 7171.0],
    [5, 8964.4],
    [6, 10202.2],
    [7, 11962.5],
    [8, 14928.3],
    [9, 16909.2],
    [10, 18547.9],
    [11, 21617.8],
    [12, 26638.1],
    [13, 34634.4],
    [14, 46759.4],
    [15, 58478.1],
    [16, 67884.6],
    [17, 74462.6],
    [18, 79395.7]
];

// See https://github.com/ecomfe/echarts-stat
// var myRegression = ecStat.regression('exponential', data4);

// myRegression.points.sort(function(a, b) {
//     return a[0] - b[0];
// });
const scatterChartData4 ={
    textStyle:{

    },
	title: {
       text: '',
        left: 'center',
        textStyle:{
            color:"#000"
        }
    },
    tooltip: {
        trigger: 'axis',
        axisPointer: {
            type: 'cross'
        },
        
    },

    xAxis: {
        type: 'value',
        splitLine: {
            lineStyle: {
                type: 'dashed'
            }
        },
        splitNumber: 20,
        axisLine:{
            lineStyle:{
               
            }
        } 
    },
    yAxis: {
        type: 'value',
        splitLine: {
            lineStyle: {
                type: 'dashed'
            }
        },
        axisLine:{
            lineStyle:{
               
            }
        } 
    },
    series: [{
        name: 'scatter',
        type: 'scatter',
        emphasis: {
            label: {
                show: true,
                position: 'left',
                color: 'blue',
                fontSize: 16
            }
        },
        data: data4
    }, {
        name: 'line',
        type: 'line',
        showSymbol: false,
        smooth: true,
        data: [],//myRegression.points
        markPoint: {
            itemStyle: {
                color: 'transparent'
            },
            label: {
                show: true,
                position: 'left',
                formatter: [],//myRegression.expression
                color: '#333',
                fontSize: 14
            },
            data: [{
                coord: []//myRegression.points[myRegression.points.length - 1]
            }]
        }
    }]
}
//
var data0 = [
    [28604, 77, 17096869, 'Australia', 1990],
    [31163, 77.4, 27662440, 'Canada', 1990],
    [1516, 68, 1154605773, 'China', 1990],
    [13670, 74.7, 10582082, 'Cuba', 1990],
    [28599, 75, 4986705, 'Finland', 1990],
    [29476, 77.1, 56943299, 'France', 1990],
    [31476, 75.4, 78958237, 'Germany', 1990],
    [28666, 78.1, 254830, 'Iceland', 1990],
    [1777, 57.7, 870601776, 'India', 1990],
    [29550, 79.1, 122249285, 'Japan', 1990],
    [2076, 67.9, 20194354, 'North Korea', 1990],
    [12087, 72, 42972254, 'South Korea', 1990],
    [24021, 75.4, 3397534, 'New Zealand', 1990],
    [43296, 76.8, 4240375, 'Norway', 1990],
    [10088, 70.8, 38195258, 'Poland', 1990],
    [19349, 69.6, 147568552, 'Russia', 1990],
    [10670, 67.3, 53994605, 'Turkey', 1990],
    [26424, 75.7, 57110117, 'United Kingdom', 1990],
    [37062, 75.4, 252847810, 'United States', 1990]
];

var data1 = [
    [44056, 81.8, 23968973, 'Australia', 2015],
    [43294, 81.7, 35939927, 'Canada', 2015],
    [13334, 76.9, 1376048943, 'China', 2015],
    [21291, 78.5, 11389562, 'Cuba', 2015],
    [38923, 80.8, 5503457, 'Finland', 2015],
    [37599, 81.9, 64395345, 'France', 2015],
    [44053, 81.1, 80688545, 'Germany', 2015],
    [42182, 82.8, 329425, 'Iceland', 2015],
    [5903, 66.8, 1311050527, 'India', 2015],
    [36162, 83.5, 126573481, 'Japan', 2015],
    [1390, 71.4, 25155317, 'North Korea', 2015],
    [34644, 80.7, 50293439, 'South Korea', 2015],
    [34186, 80.6, 4528526, 'New Zealand', 2015],
    [64304, 81.6, 5210967, 'Norway', 2015],
    [24787, 77.3, 38611794, 'Poland', 2015],
    [23038, 73.13, 143456918, 'Russia', 2015],
    [19360, 76.5, 78665830, 'Turkey', 2015],
    [38225, 81.4, 64715810, 'United Kingdom', 2015],
    [53354, 79.1, 321773631, 'United States', 2015]
];

var data5 = [
    [28604, 77],
    [31163, 77.4],
    [1516, 68],
    [13670, 74.7],
    [28599, 75],
    [29476, 77.1],
    [31476, 75.4],
    [28666, 78.1],
    [1777, 57.7],
    [29550, 79.1],
    [2076, 67.9],
    [12087, 72],
    [24021, 75.4],
    [43296, 76.8],
    [10088, 70.8],
    [19349, 69.6],
    [10670, 67.3],
    [26424, 75.7],
    [37062, 75.4],
    [44056, 81.8],
    [43294, 81.7],
    [13334, 76.9],
    [21291, 78.5],
    [38923, 80.8],
    [37599, 81.9],
    [44053, 81.1],
    [42182, 82.8],
    [5903, 66.8],
    [36162, 83.5],
    [1390, 71.4],
    [34644, 80.7],
    [34186, 80.6],
    [64304, 81.6],
    [24787, 77.3],
    [23038, 73.13],
    [19360, 76.5],
    [38225, 81.4],
    [53354, 79.1]
];
// See https://github.com/ecomfe/echarts-stat
var myRegression5 = ecStat.regression('logarithmic', data5);

myRegression5.points.sort(function(a, b) {
    return a[0] - b[0];
});
const scatterChartData5 = {
    textStyle:{

    },
	legend: {
        data: ['1990', '2015'],
        top:"20px",
        textStyle:{}
    },
    title: {
        text: '1990 and 2015 per capita life expectancy and GDP',
        left:"center",
        textStyle:{
            color:"#000"
        }
    },
    tooltip: {
        trigger: 'axis',
        axisPointer: {
            type: 'cross'
        }
        
    },
    grid: {
        top: 80,
        bottom: 90
    },
    xAxis: {
        type: 'value',
        splitLine: {
            lineStyle: {
                type: 'dashed'
            }
        },
        axisLine:{
            lineStyle:{
               
            }
        } 
    },
    yAxis: {
        type: 'value',
        splitLine: {
            lineStyle: {
                type: 'dashed'
            }
        },
        axisLine:{
            lineStyle:{
               
            }
        } 
    },
    series: [
		{
        name: '1990',
        type: 'scatter',
        symbolSize: function(data) {
            return Math.sqrt(data[2]) / 5e2;
        },
        emphasis: {
            label: {
                show: true,
                formatter: function(param) {
                    return param.data[3];
                },
                position: 'top'
            }
        },
        itemStyle: {
            shadowBlur: 10,
            shadowColor: 'rgba(120, 36, 50, 0.5)',
            shadowOffsetY: 5,
            color: new echarts.graphic.RadialGradient(0.4, 0.3, 1, [{
                offset: 0,
                color: 'rgb(251, 118, 123)'
            }, {
                offset: 1,
                color: 'rgb(204, 46, 72)'
            }])
        },
        data: data0
    }, {
        name: '2015',
        type: 'scatter',
        symbolSize: function(data) {
            return Math.sqrt(data[2]) / 5e2;
        },
        emphasis: {
            label: {
                show: true,
                formatter: function(param) {
                    return param.data[3];
                },
                position: 'top'
            }
        },
        itemStyle: {
            shadowBlur: 10,
            shadowColor: 'rgba(25, 100, 150, 0.5)',
            shadowOffsetY: 5,
            color: new echarts.graphic.RadialGradient(0.4, 0.3, 1, [{
                offset: 0,
                color: 'rgb(129, 227, 238)'
            }, {
                offset: 1,
                color: 'rgb(25, 183, 207)'
            }])
        },
        data: data1
    }, {
        name: 'line',
        type: 'line',
        lineStyle: {
            normal: {
                color: '#2f4554'
            }
        },
        smooth: true,
        showSymbol: false,
        data: myRegression5.points,
        markPoint: {
            itemStyle: {
                color: 'transparent'
            },
            label: {
                show: true,
                position: 'left',
                formatter: myRegression5.expression,
                color: '#333',
                fontSize: 14
            },
            data: [{
                coord: myRegression5.points[myRegression5.points.length - 1]
            }]
        }
    }]
}

var data6 = [
    [0.067732, 3.176513],
    [0.42781, 3.816464],
    [0.995731, 4.550095],
    [0.738336, 4.256571],
    [0.981083, 4.560815],
    [0.526171, 3.929515],
    [0.378887, 3.52617],
    [0.033859, 3.156393],
    [0.132791, 3.110301],
    [0.138306, 3.149813],
    [0.247809, 3.476346],
    [0.64827, 4.119688],
    [0.731209, 4.282233],
    [0.236833, 3.486582],
    [0.969788, 4.655492],
    [0.607492, 3.965162],
    [0.358622, 3.5149],
    [0.147846, 3.125947],
    [0.63782, 4.094115],
    [0.230372, 3.476039],
    [0.070237, 3.21061],
    [0.067154, 3.190612],
    [0.925577, 4.631504],
    [0.717733, 4.29589],
    [0.015371, 3.085028],
    [0.33507, 3.44808],
    [0.040486, 3.16744],
    [0.212575, 3.364266],
    [0.617218, 3.993482],
    [0.541196, 3.891471],
    [0.045353, 3.143259],
    [0.126762, 3.114204],
    [0.556486, 3.851484],
    [0.901144, 4.621899],
    [0.958476, 4.580768],
    [0.274561, 3.620992],
    [0.394396, 3.580501],
    [0.87248, 4.618706],
    [0.409932, 3.676867],
    [0.908969, 4.641845],
    [0.166819, 3.175939],
    [0.665016, 4.26498],
    [0.263727, 3.558448],
    [0.231214, 3.436632],
    [0.552928, 3.831052],
    [0.047744, 3.182853],
    [0.365746, 3.498906],
    [0.495002, 3.946833],
    [0.493466, 3.900583],
    [0.792101, 4.238522],
    [0.76966, 4.23308],
    [0.251821, 3.521557],
    [0.181951, 3.203344],
    [0.808177, 4.278105],
    [0.334116, 3.555705],
    [0.33863, 3.502661],
    [0.452584, 3.859776],
    [0.69477, 4.275956],
    [0.590902, 3.916191],
    [0.307928, 3.587961],
    [0.148364, 3.183004],
    [0.70218, 4.225236],
    [0.721544, 4.231083],
    [0.666886, 4.240544],
    [0.124931, 3.222372],
    [0.618286, 4.021445],
    [0.381086, 3.567479],
    [0.385643, 3.56258],
    [0.777175, 4.262059],
    [0.116089, 3.208813],
    [0.115487, 3.169825],
    [0.66351, 4.193949],
    [0.254884, 3.491678],
    [0.993888, 4.533306],
    [0.295434, 3.550108],
    [0.952523, 4.636427],
    [0.307047, 3.557078],
    [0.277261, 3.552874],
    [0.279101, 3.494159],
    [0.175724, 3.206828],
    [0.156383, 3.195266],
    [0.733165, 4.221292],
    [0.848142, 4.413372],
    [0.771184, 4.184347],
    [0.429492, 3.742878],
    [0.162176, 3.201878],
    [0.917064, 4.648964],
    [0.315044, 3.510117],
    [0.201473, 3.274434],
    [0.297038, 3.579622],
    [0.336647, 3.489244],
    [0.666109, 4.237386],
    [0.583888, 3.913749],
    [0.085031, 3.22899],
    [0.687006, 4.286286],
    [0.949655, 4.628614],
    [0.189912, 3.239536],
    [0.844027, 4.457997],
    [0.333288, 3.513384],
    [0.427035, 3.729674],
    [0.466369, 3.834274],
    [0.550659, 3.811155],
    [0.278213, 3.598316],
    [0.918769, 4.692514],
    [0.886555, 4.604859],
    [0.569488, 3.864912],
    [0.066379, 3.184236],
    [0.335751, 3.500796],
    [0.426863, 3.743365],
    [0.395746, 3.622905],
    [0.694221, 4.310796],
    [0.27276, 3.583357],
    [0.503495, 3.901852],
    [0.067119, 3.233521],
    [0.038326, 3.105266],
    [0.599122, 3.865544],
    [0.947054, 4.628625],
    [0.671279, 4.231213],
    [0.434811, 3.791149],
    [0.509381, 3.968271],
    [0.749442, 4.25391],
    [0.058014, 3.19471],
    [0.482978, 3.996503],
    [0.466776, 3.904358],
    [0.357767, 3.503976],
    [0.949123, 4.557545],
    [0.41732, 3.699876],
    [0.920461, 4.613614],
    [0.156433, 3.140401],
    [0.656662, 4.206717],
    [0.616418, 3.969524],
    [0.853428, 4.476096],
    [0.133295, 3.136528],
    [0.693007, 4.279071],
    [0.178449, 3.200603],
    [0.199526, 3.299012],
    [0.073224, 3.209873],
    [0.286515, 3.632942],
    [0.182026, 3.248361],
    [0.621523, 3.995783],
    [0.344584, 3.563262],
    [0.398556, 3.649712],
    [0.480369, 3.951845],
    [0.15335, 3.145031],
    [0.171846, 3.181577],
    [0.867082, 4.637087],
    [0.223855, 3.404964],
    [0.528301, 3.873188],
    [0.890192, 4.633648],
    [0.106352, 3.154768],
    [0.917886, 4.623637],
    [0.014855, 3.078132],
    [0.567682, 3.913596],
    [0.068854, 3.221817],
    [0.603535, 3.938071],
    [0.53205, 3.880822],
    [0.651362, 4.176436],
    [0.901225, 4.648161],
    [0.204337, 3.332312],
    [0.696081, 4.240614],
    [0.963924, 4.532224],
    [0.98139, 4.557105],
    [0.987911, 4.610072],
    [0.990947, 4.636569],
    [0.736021, 4.229813],
    [0.253574, 3.50086],
    [0.674722, 4.245514],
    [0.939368, 4.605182],
    [0.235419, 3.45434],
    [0.110521, 3.180775],
    [0.218023, 3.38082],
    [0.869778, 4.56502],
    [0.19683, 3.279973],
    [0.958178, 4.554241],
    [0.972673, 4.63352],
    [0.745797, 4.281037],
    [0.445674, 3.844426],
    [0.470557, 3.891601],
    [0.549236, 3.849728],
    [0.335691, 3.492215],
    [0.884739, 4.592374],
    [0.918916, 4.632025],
    [0.441815, 3.75675],
    [0.116598, 3.133555],
    [0.359274, 3.567919],
    [0.814811, 4.363382],
    [0.387125, 3.560165],
    [0.982243, 4.564305],
    [0.78088, 4.215055],
    [0.652565, 4.174999],
    [0.87003, 4.58664],
    [0.604755, 3.960008],
    [0.255212, 3.529963],
    [0.730546, 4.213412],
    [0.493829, 3.908685],
    [0.257017, 3.585821],
    [0.833735, 4.374394],
    [0.070095, 3.213817],
    [0.52707, 3.952681],
    [0.116163, 3.129283]
];

// See https://github.com/ecomfe/echarts-stat
var myRegression6 = ecStat.regression('linear', data6);

myRegression6.points.sort(function(a, b) {
    return a[0] - b[0];
});

const scatterChartData6 = {
    textStyle:{

    },
    title: {
        text: 'Linear Regression',
        left:"center",
        textStyle:{
            color:"#000"
        }
    },
    tooltip: {
        trigger: 'axis',
        axisPointer: {
            type: 'cross'
        }
    },
    xAxis: {
        type: 'value',
        splitLine: {
            lineStyle: {
                type: 'dashed'
            }
        },
        axisLine:{
            lineStyle:{
               
            }
        } 
    },
    yAxis: {
        type: 'value',
        min: 1.5,
        splitLine: {
            lineStyle: {
                type: 'dashed'
            }
        },
        axisLine:{
            lineStyle:{
               
            }
        } 
    },
    series: [{
        name: 'scatter',
        type: 'scatter',
        emphasis: {
            label: {
                show: true,
                position: 'left',
                color: 'blue',
                fontSize: 16
            }
        },
        data: data
    }, {
        name: 'line',
        type: 'line',
        showSymbol: false,
        data: myRegression6.points,
        markPoint: {
            itemStyle: {
                color: 'transparent'
            },
            label: {
                show: true,
                position: 'left',
                formatter: myRegression6.expression,
                color: '#333',
                fontSize: 14
            },
            data: [{
                coord: myRegression6.points[myRegression6.points.length - 1]
            }]
        }
    }]
};



const funnelPlotChartData = {
    textStyle:{

    },
	title: {
        text: '漏斗图',
        left:"center",
        top:"30px",
        textStyle:{
            color:"#000"
        }
    },
    tooltip: {
        trigger: 'item',
        formatter: "{a} <br/>{b} : {c}%"
    },
    toolbox: {
        feature: {
            dataView: {readOnly: false},
            restore: {},
            saveAsImage: {}
        }
    },
    legend: {
        data: ['展现','点击','访问','咨询','订单'],
        textStyle:{}
    },

    series: [
        {
            name:'漏斗图',
            type:'funnel',
            left: '10%',
            top: 60,
            //x2: 80,
            bottom: 60,
            width: '80%',
            // height: {totalHeight} - y - y2,
            min: 0,
            max: 100,
            minSize: '0%',
            maxSize: '100%',
            sort: 'descending',
            gap: 2,
            label: {
                show: true,
                position: 'inside'
            },
            labelLine: {
                length: 10,
                lineStyle: {
                    width: 1,
                    type: 'solid'
                }
            },
            itemStyle: {
                borderColor: '#fff',
                borderWidth: 1
            },
            emphasis: {
                label: {
                    fontSize: 20
                }
            },
            data: [
                {value: 60, name: '访问'},
                {value: 40, name: '咨询'},
                {value: 20, name: '订单'},
                {value: 80, name: '点击'},
                {value: 100, name: '展现'}
            ]
        }
    ]
};
const funnelPlotChartData2 = {
    textStyle:{

    },
	title: {
        text: '漏斗图',
        left:"center",
        top:"30px",
        textStyle:{
            color:"#000"
        }
    },
    tooltip: {
        trigger: 'item',
        formatter: "{a} <br/>{b} : {c}%"
    },
    toolbox: {
        feature: {
            dataView: {readOnly: false},
            restore: {},
            saveAsImage: {}
        }
    },
    legend: {
        data: ['展现','点击','访问','咨询','订单'],
        textStyle:{}
    },
    series: [
        {
            name: '预期',
            type: 'funnel',
            left: '10%',
            width: '80%',
            sort: 'descending',
            label: {
                formatter: '{b}预期'
            },
            labelLine: {
                show: false
            },
            itemStyle: {
                opacity: 0.7
            },
            emphasis: {
                label: {
                    position: 'inside',
                    formatter: '{b}预期: {c}%'
                }
            },
            data: [
                {value: 60, name: '访问'},
                {value: 40, name: '咨询'},
                {value: 20, name: '订单'},
                {value: 80, name: '点击'},
                {value: 100, name: '展现'}
            ]
        },
        {
            name: '实际',
            type: 'funnel',
            left: '10%',
            width: '80%',
            maxSize: '80%',
            sort: 'descending',
            label: {
                position: 'inside',
                formatter: '{c}%',
                color: '#fff'
            },
            itemStyle: {
                opacity: 0.5,
                borderColor: '#fff',
                borderWidth: 2
            },
            emphasis: {
                label: {
                    position: 'inside',
                    formatter: '{b}实际: {c}%'
                }
            },
            data: [
                {value: 30, name: '访问'},
                {value: 10, name: '咨询'},
                {value: 5, name: '订单'},
                {value: 50, name: '点击'},
                {value: 80, name: '展现'}
            ]
        }
    ]
}

//map ZBg0yGMrsQSfvlfSsauef3bP2dkYgQFm
var dataMap = [
	{name: '海门', value: 9},
	{name: '鄂尔多斯', value: 12},
	{name: '招远', value: 12},
	{name: '舟山', value: 12},
	{name: '齐齐哈尔', value: 14},
	{name: '盐城', value: 15},
	{name: '赤峰', value: 16},
	{name: '青岛', value: 18},
	{name: '乳山', value: 18},
	{name: '金昌', value: 19},
	{name: '泉州', value: 21},
	{name: '莱西', value: 21},
	{name: '日照', value: 21},
	{name: '胶南', value: 22},
	{name: '南通', value: 23},
	{name: '拉萨', value: 24},
	{name: '云浮', value: 24},
	{name: '梅州', value: 25},
	{name: '文登', value: 25},
	{name: '上海', value: 25},
	{name: '攀枝花', value: 25},
	{name: '威海', value: 25},
	{name: '承德', value: 25},
	{name: '厦门', value: 26},
	{name: '汕尾', value: 26},
	{name: '潮州', value: 26},
	{name: '丹东', value: 27},
	{name: '太仓', value: 27},
	{name: '曲靖', value: 27},
	{name: '烟台', value: 28},
	{name: '福州', value: 29},
	{name: '瓦房店', value: 30},
	{name: '即墨', value: 30},
	{name: '抚顺', value: 31},
	{name: '玉溪', value: 31},
	{name: '张家口', value: 31},
	{name: '阳泉', value: 31},
	{name: '莱州', value: 32},
	{name: '湖州', value: 32},
	{name: '汕头', value: 32},
	{name: '昆山', value: 33},
	{name: '宁波', value: 33},
	{name: '湛江', value: 33},
	{name: '揭阳', value: 34},
	{name: '荣成', value: 34},
	{name: '连云港', value: 35},
	{name: '葫芦岛', value: 35},
	{name: '常熟', value: 36},
	{name: '东莞', value: 36},
	{name: '河源', value: 36},
	{name: '淮安', value: 36},
	{name: '泰州', value: 36},
	{name: '南宁', value: 37},
	{name: '营口', value: 37},
	{name: '惠州', value: 37},
	{name: '江阴', value: 37},
	{name: '蓬莱', value: 37},
	{name: '韶关', value: 38},
	{name: '嘉峪关', value: 38},
	{name: '广州', value: 38},
	{name: '延安', value: 38},
	{name: '太原', value: 39},
	{name: '清远', value: 39},
	{name: '中山', value: 39},
	{name: '昆明', value: 39},
	{name: '寿光', value: 40},
	{name: '盘锦', value: 40},
	{name: '长治', value: 41},
	{name: '深圳', value: 41},
	{name: '珠海', value: 42},
	{name: '宿迁', value: 43},
	{name: '咸阳', value: 43},
	{name: '铜川', value: 44},
	{name: '平度', value: 44},
	{name: '佛山', value: 44},
	{name: '海口', value: 44},
	{name: '江门', value: 45},
	{name: '章丘', value: 45},
	{name: '肇庆', value: 46},
	{name: '大连', value: 47},
	{name: '临汾', value: 47},
	{name: '吴江', value: 47},
	{name: '石嘴山', value: 49},
	{name: '沈阳', value: 50},
	{name: '苏州', value: 50},
	{name: '茂名', value: 50},
	{name: '嘉兴', value: 51},
	{name: '长春', value: 51},
	{name: '胶州', value: 52},
	{name: '银川', value: 52},
	{name: '张家港', value: 52},
	{name: '三门峡', value: 53},
	{name: '锦州', value: 54},
	{name: '南昌', value: 54},
	{name: '柳州', value: 54},
	{name: '三亚', value: 54},
	{name: '自贡', value: 56},
	{name: '吉林', value: 56},
	{name: '阳江', value: 57},
	{name: '泸州', value: 57},
	{name: '西宁', value: 57},
	{name: '宜宾', value: 58},
	{name: '呼和浩特', value: 58},
	{name: '成都', value: 58},
	{name: '大同', value: 58},
	{name: '镇江', value: 59},
	{name: '桂林', value: 59},
	{name: '张家界', value: 59},
	{name: '宜兴', value: 59},
	{name: '北海', value: 60},
	{name: '西安', value: 61},
	{name: '金坛', value: 62},
	{name: '东营', value: 62},
	{name: '牡丹江', value: 63},
	{name: '遵义', value: 63},
	{name: '绍兴', value: 63},
	{name: '扬州', value: 64},
	{name: '常州', value: 64},
	{name: '潍坊', value: 65},
	{name: '重庆', value: 66},
	{name: '台州', value: 67},
	{name: '南京', value: 67},
	{name: '滨州', value: 70},
	{name: '贵阳', value: 71},
	{name: '无锡', value: 71},
	{name: '本溪', value: 71},
	{name: '克拉玛依', value: 72},
	{name: '渭南', value: 72},
	{name: '马鞍山', value: 72},
	{name: '宝鸡', value: 72},
	{name: '焦作', value: 75},
	{name: '句容', value: 75},
	{name: '北京', value: 79},
	{name: '徐州', value: 79},
	{name: '衡水', value: 80},
	{name: '包头', value: 80},
	{name: '绵阳', value: 80},
	{name: '乌鲁木齐', value: 84},
	{name: '枣庄', value: 84},
	{name: '杭州', value: 84},
	{name: '淄博', value: 85},
	{name: '鞍山', value: 86},
	{name: '溧阳', value: 86},
	{name: '库尔勒', value: 86},
	{name: '安阳', value: 90},
	{name: '开封', value: 90},
	{name: '济南', value: 92},
	{name: '德阳', value: 93},
	{name: '温州', value: 95},
	{name: '九江', value: 96},
	{name: '邯郸', value: 98},
	{name: '临安', value: 99},
	{name: '兰州', value: 99},
	{name: '沧州', value: 100},
	{name: '临沂', value: 103},
	{name: '南充', value: 104},
	{name: '天津', value: 105},
	{name: '富阳', value: 106},
	{name: '泰安', value: 112},
	{name: '诸暨', value: 112},
	{name: '郑州', value: 113},
	{name: '哈尔滨', value: 114},
	{name: '聊城', value: 116},
	{name: '芜湖', value: 117},
	{name: '唐山', value: 119},
	{name: '平顶山', value: 119},
	{name: '邢台', value: 119},
	{name: '德州', value: 120},
	{name: '济宁', value: 120},
	{name: '荆州', value: 127},
	{name: '宜昌', value: 130},
	{name: '义乌', value: 132},
	{name: '丽水', value: 133},
	{name: '洛阳', value: 134},
	{name: '秦皇岛', value: 136},
	{name: '株洲', value: 143},
	{name: '石家庄', value: 147},
	{name: '莱芜', value: 148},
	{name: '常德', value: 152},
	{name: '保定', value: 153},
	{name: '湘潭', value: 154},
	{name: '金华', value: 157},
	{name: '岳阳', value: 169},
	{name: '长沙', value: 175},
	{name: '衢州', value: 177},
	{name: '廊坊', value: 193},
	{name: '菏泽', value: 194},
	{name: '合肥', value: 229},
	{name: '武汉', value: 273},
	{name: '大庆', value: 279}
];
var geoCoordMap = {
   '海门':[121.15,31.89],
   '鄂尔多斯':[109.781327,39.608266],
   '招远':[120.38,37.35],
   '舟山':[122.207216,29.985295],
   '齐齐哈尔':[123.97,47.33],
   '盐城':[120.13,33.38],
   '赤峰':[118.87,42.28],
   '青岛':[120.33,36.07],
   '乳山':[121.52,36.89],
   '金昌':[102.188043,38.520089],
   '泉州':[118.58,24.93],
   '莱西':[120.53,36.86],
   '日照':[119.46,35.42],
   '胶南':[119.97,35.88],
   '南通':[121.05,32.08],
   '拉萨':[91.11,29.97],
   '云浮':[112.02,22.93],
   '梅州':[116.1,24.55],
   '文登':[122.05,37.2],
   '上海':[121.48,31.22],
   '攀枝花':[101.718637,26.582347],
   '威海':[122.1,37.5],
   '承德':[117.93,40.97],
   '厦门':[118.1,24.46],
   '汕尾':[115.375279,22.786211],
   '潮州':[116.63,23.68],
   '丹东':[124.37,40.13],
   '太仓':[121.1,31.45],
   '曲靖':[103.79,25.51],
   '烟台':[121.39,37.52],
   '福州':[119.3,26.08],
   '瓦房店':[121.979603,39.627114],
   '即墨':[120.45,36.38],
   '抚顺':[123.97,41.97],
   '玉溪':[102.52,24.35],
   '张家口':[114.87,40.82],
   '阳泉':[113.57,37.85],
   '莱州':[119.942327,37.177017],
   '湖州':[120.1,30.86],
   '汕头':[116.69,23.39],
   '昆山':[120.95,31.39],
   '宁波':[121.56,29.86],
   '湛江':[110.359377,21.270708],
   '揭阳':[116.35,23.55],
   '荣成':[122.41,37.16],
   '连云港':[119.16,34.59],
   '葫芦岛':[120.836932,40.711052],
   '常熟':[120.74,31.64],
   '东莞':[113.75,23.04],
   '河源':[114.68,23.73],
   '淮安':[119.15,33.5],
   '泰州':[119.9,32.49],
   '南宁':[108.33,22.84],
   '营口':[122.18,40.65],
   '惠州':[114.4,23.09],
   '江阴':[120.26,31.91],
   '蓬莱':[120.75,37.8],
   '韶关':[113.62,24.84],
   '嘉峪关':[98.289152,39.77313],
   '广州':[113.23,23.16],
   '延安':[109.47,36.6],
   '太原':[112.53,37.87],
   '清远':[113.01,23.7],
   '中山':[113.38,22.52],
   '昆明':[102.73,25.04],
   '寿光':[118.73,36.86],
   '盘锦':[122.070714,41.119997],
   '长治':[113.08,36.18],
   '深圳':[114.07,22.62],
   '珠海':[113.52,22.3],
   '宿迁':[118.3,33.96],
   '咸阳':[108.72,34.36],
   '铜川':[109.11,35.09],
   '平度':[119.97,36.77],
   '佛山':[113.11,23.05],
   '海口':[110.35,20.02],
   '江门':[113.06,22.61],
   '章丘':[117.53,36.72],
   '肇庆':[112.44,23.05],
   '大连':[121.62,38.92],
   '临汾':[111.5,36.08],
   '吴江':[120.63,31.16],
   '石嘴山':[106.39,39.04],
   '沈阳':[123.38,41.8],
   '苏州':[120.62,31.32],
   '茂名':[110.88,21.68],
   '嘉兴':[120.76,30.77],
   '长春':[125.35,43.88],
   '胶州':[120.03336,36.264622],
   '银川':[106.27,38.47],
   '张家港':[120.555821,31.875428],
   '三门峡':[111.19,34.76],
   '锦州':[121.15,41.13],
   '南昌':[115.89,28.68],
   '柳州':[109.4,24.33],
   '三亚':[109.511909,18.252847],
   '自贡':[104.778442,29.33903],
   '吉林':[126.57,43.87],
   '阳江':[111.95,21.85],
   '泸州':[105.39,28.91],
   '西宁':[101.74,36.56],
   '宜宾':[104.56,29.77],
   '呼和浩特':[111.65,40.82],
   '成都':[104.06,30.67],
   '大同':[113.3,40.12],
   '镇江':[119.44,32.2],
   '桂林':[110.28,25.29],
   '张家界':[110.479191,29.117096],
   '宜兴':[119.82,31.36],
   '北海':[109.12,21.49],
   '西安':[108.95,34.27],
   '金坛':[119.56,31.74],
   '东营':[118.49,37.46],
   '牡丹江':[129.58,44.6],
   '遵义':[106.9,27.7],
   '绍兴':[120.58,30.01],
   '扬州':[119.42,32.39],
   '常州':[119.95,31.79],
   '潍坊':[119.1,36.62],
   '重庆':[106.54,29.59],
   '台州':[121.420757,28.656386],
   '南京':[118.78,32.04],
   '滨州':[118.03,37.36],
   '贵阳':[106.71,26.57],
   '无锡':[120.29,31.59],
   '本溪':[123.73,41.3],
   '克拉玛依':[84.77,45.59],
   '渭南':[109.5,34.52],
   '马鞍山':[118.48,31.56],
   '宝鸡':[107.15,34.38],
   '焦作':[113.21,35.24],
   '句容':[119.16,31.95],
   '北京':[116.46,39.92],
   '徐州':[117.2,34.26],
   '衡水':[115.72,37.72],
   '包头':[110,40.58],
   '绵阳':[104.73,31.48],
   '乌鲁木齐':[87.68,43.77],
   '枣庄':[117.57,34.86],
   '杭州':[120.19,30.26],
   '淄博':[118.05,36.78],
   '鞍山':[122.85,41.12],
   '溧阳':[119.48,31.43],
   '库尔勒':[86.06,41.68],
   '安阳':[114.35,36.1],
   '开封':[114.35,34.79],
   '济南':[117,36.65],
   '德阳':[104.37,31.13],
   '温州':[120.65,28.01],
   '九江':[115.97,29.71],
   '邯郸':[114.47,36.6],
   '临安':[119.72,30.23],
   '兰州':[103.73,36.03],
   '沧州':[116.83,38.33],
   '临沂':[118.35,35.05],
   '南充':[106.110698,30.837793],
   '天津':[117.2,39.13],
   '富阳':[119.95,30.07],
   '泰安':[117.13,36.18],
   '诸暨':[120.23,29.71],
   '郑州':[113.65,34.76],
   '哈尔滨':[126.63,45.75],
   '聊城':[115.97,36.45],
   '芜湖':[118.38,31.33],
   '唐山':[118.02,39.63],
   '平顶山':[113.29,33.75],
   '邢台':[114.48,37.05],
   '德州':[116.29,37.45],
   '济宁':[116.59,35.38],
   '荆州':[112.239741,30.335165],
   '宜昌':[111.3,30.7],
   '义乌':[120.06,29.32],
   '丽水':[119.92,28.45],
   '洛阳':[112.44,34.7],
   '秦皇岛':[119.57,39.95],
   '株洲':[113.16,27.83],
   '石家庄':[114.48,38.03],
   '莱芜':[117.67,36.19],
   '常德':[111.69,29.05],
   '保定':[115.48,38.85],
   '湘潭':[112.91,27.87],
   '金华':[119.64,29.12],
   '岳阳':[113.09,29.37],
   '长沙':[113,28.21],
   '衢州':[118.88,28.97],
   '廊坊':[116.7,39.53],
   '菏泽':[115.480656,35.23375],
   '合肥':[117.27,31.86],
   '武汉':[114.31,30.52],
   '大庆':[125.03,46.58]
};
var convertData = function (data) {
   var res = [];
   for (var i = 0; i < data.length; i++) {
	   var geoCoord = geoCoordMap[data[i].name];
	   if (geoCoord) {
		   res.push({
			   name: data[i].name,
			   value: geoCoord.concat(data[i].value)
		   });
	   }
   }
   return res;
};
const mapChartData = {
    textStyle:{

    },
   title: {
	   text: '全国主要城市空气质量 - 百度地图',
       left: 'center',
       textStyle:{
        color:"#000"
    }
   },
   tooltip : {
	   trigger: 'item'
   },
   bmap: {
	//center: [104.114129, 37.550339],
	zoom: 5,
	roam: true,
	mapStyle: {
		styleJson: [{
			'featureType': 'water',
			'elementType': 'all',
			'stylers': {
                'color': '#d1d1d1'
                
			}
		}, {
			'featureType': 'land',
			'elementType': 'all',
			'stylers': {
				'color': '#f3f3f3'
			}
		}, {
			'featureType': 'railway',
			'elementType': 'all',
			'stylers': {
				'visibility': 'off'
			}
		}, {
			'featureType': 'highway',
			'elementType': 'all',
			'stylers': {
				'color': '#fdfdfd'
			}
		}, {
			'featureType': 'highway',
			'elementType': 'labels',
			'stylers': {
				'visibility': 'off'
			}
		}, {
			'featureType': 'arterial',
			'elementType': 'geometry',
			'stylers': {
				'color': '#fefefe'
			}
		}, {
			'featureType': 'arterial',
			'elementType': 'geometry.fill',
			'stylers': {
				'color': '#fefefe'
			}
		}, {
			'featureType': 'poi',
			'elementType': 'all',
			'stylers': {
				'visibility': 'off'
			}
		}, {
			'featureType': 'green',
			'elementType': 'all',
			'stylers': {
				'visibility': 'off'
			}
		}, {
			'featureType': 'subway',
			'elementType': 'all',
			'stylers': {
				'visibility': 'off'
			}
		}, {
			'featureType': 'manmade',
			'elementType': 'all',
			'stylers': {
				'color': '#d1d1d1'
			}
		}, {
			'featureType': 'local',
			'elementType': 'all',
			'stylers': {
				'color': '#d1d1d1'
			}
		}, {
			'featureType': 'arterial',
			'elementType': 'labels',
			'stylers': {
				'visibility': 'off'
			}
		}, {
			'featureType': 'boundary',
			'elementType': 'all',
			'stylers': {
				'color': '#fefefe'
			}
		}, {
			'featureType': 'building',
			'elementType': 'all',
			'stylers': {
				'color': '#d1d1d1'
			}
		}, {
			'featureType': 'label',
			'elementType': 'labels.text.fill',
			'stylers': {
                'color': '#999999',
			}
		}]
	}
},
   series : [
	   {
		   name: 'pm2.5',
		   type: 'scatter',
		   coordinateSystem: 'bmap',
		   data: convertData(dataMap),
		   symbolSize: function (val) {
			   return val[1] / 10;
		   },
		   label: {
			   formatter: '{b}',
			   position: 'right',
			   show: false
		   },
		   itemStyle: {
               color: 'purple',
               //color: 'lightskyblue'
             
		   },
		   emphasis: {
			   label: {
				   show: true
			   }
		   }
	   },
	   {
		   name: 'Top 5',
		   type: 'effectScatter',
		   coordinateSystem: 'bmap',
		   data: convertData(dataMap.sort(function (a, b) {
			   return b.value - a.value;
		   }).slice(0, 6)),
		   symbolSize: function (val) {
			   return val[1] / 10;
		   },
		   showEffectOn: 'render',
		   rippleEffect: {
			   brushType: 'stroke'
		   },
		   hoverAnimation: true,
		   label: {
			   formatter: '{b}',
			   position: 'right',
			   show: true
		   },
		   itemStyle: {
			   color: 'purple',
			   shadowBlur: 10,
               shadowColor: '#333',
		   },
		   zlevel: 1
	   }
   ]
};

//https://echarts.apache.org/examples/data/asset/geo/HK.json
// axios({
//     method: 'GET',
//     url: "https://echarts.apache.org/examples/data/asset/geo/HK.json",
// }).then(res=>{
// 	echarts.registerMap('HK', res.data);
// })

// const mapChartData2 = {
//     textStyle:{

//     },
// 	title: {
//         text: '香港18区人口密度 （2011）',
//         textStyle:{
//             color:"#000"
//         },
// 		sublink: 'http://zh.wikipedia.org/wiki/%E9%A6%99%E6%B8%AF%E8%A1%8C%E6%94%BF%E5%8D%80%E5%8A%83#cite_note-12'
// 	},
// 	tooltip: {
// 		trigger: 'item',
// 		formatter: '{b}<br/>{c} (p / km2)'
// 	},
// 	toolbox: {
// 		show: true,
// 		orient: 'vertical',
// 		left: 'right',
// 		top: 'center',
// 		feature: {
// 			dataView: {readOnly: false},
// 			restore: {},
// 			saveAsImage: {}
// 		}
// 	},
// 	visualMap: {
// 		min: 800,
// 		max: 50000,
// 		text: ['High', 'Low'],
// 		realtime: false,
// 		calculable: true,
// 		inRange: {
// 			color: ['lightskyblue', 'yellow', 'orangered']
// 		}
// 	},
// 	series: [
// 		{
// 			name: '人口密度',
// 			type: 'map',
// 			mapType: 'HK', // 自定义扩展图表类型
// 			label: {
// 				show: true
// 			},
// 			data: [
// 				{name: '中西区', value: 20057.34},
// 				{name: '湾仔', value: 15477.48},
// 				{name: '东区', value: 31686.1},
// 				{name: '南区', value: 6992.6},
// 				{name: '油尖旺', value: 44045.49},
// 				{name: '深水埗', value: 40689.64},
// 				{name: '九龙城', value: 37659.78},
// 				{name: '黄大仙', value: 45180.97},
// 				{name: '观塘', value: 55204.26},
// 				{name: '葵青', value: 21900.9},
// 				{name: '荃湾', value: 4918.26},
// 				{name: '屯门', value: 5881.84},
// 				{name: '元朗', value: 4178.01},
// 				{name: '北区', value: 2227.92},
// 				{name: '大埔', value: 2180.98},
// 				{name: '沙田', value: 9172.94},
// 				{name: '西贡', value: 3368},
// 				{name: '离岛', value: 806.98}
// 			],
// 			// 自定义名称映射
// 			nameMap: {
// 				'Central and Western': '中西区',
// 				'Eastern': '东区',
// 				'Islands': '离岛',
// 				'Kowloon City': '九龙城',
// 				'Kwai Tsing': '葵青',
// 				'Kwun Tong': '观塘',
// 				'North': '北区',
// 				'Sai Kung': '西贡',
// 				'Sha Tin': '沙田',
// 				'Sham Shui Po': '深水埗',
// 				'Southern': '南区',
// 				'Tai Po': '大埔',
// 				'Tsuen Wan': '荃湾',
// 				'Tuen Mun': '屯门',
// 				'Wan Chai': '湾仔',
// 				'Wong Tai Sin': '黄大仙',
// 				'Yau Tsim Mong': '油尖旺',
// 				'Yuen Long': '元朗'
// 			}
// 		}
// 	]
// }

window.dataList = [{
    name: "南海诸岛",
    value: 0
},
{
    name: '北京',
    value: 54
},
{
    name: '天津',
    value: 13
},
{
    name: '上海',
    value: 40
},
{
    name: '重庆',
    value: 75
},
{
    name: '河北',
    value: 13
},
{
    name: '河南',
    value: 83
},
{
    name: '云南',
    value: 11
},
{
    name: '辽宁',
    value: 19
},
{
    name: '黑龙江',
    value: 15
},
{
    name: '湖南',
    value: 69
},
{
    name: '安徽',
    value: 60
},
{
    name: '山东',
    value: 39
},
{
    name: '新疆',
    value: 4
},
{
    name: '江苏',
    value: 31
},
{
    name: '浙江',
    value: 104
},
{
    name: '江西',
    value: 36
},
{
    name: '湖北',
    value: 1052
},
{
    name: '广西',
    value: 33
},
{
    name: '甘肃',
    value: 7
},
{
    name: '山西',
    value: 9
},
{
    name: '内蒙古',
    value: 7
},
{
    name: '陕西',
    value: 22
},
{
    name: '吉林',
    value: 4
},
{
    name: '福建',
    value: 18
},
{
    name: '贵州',
    value: 5
},
{
    name: '广东',
    value: 98
},
{
    name: '青海',
    value: 1
},
{
    name: '西藏',
    value: 0
},
{
    name: '四川',
    value: 44
},
{
    name: '宁夏',
    value: 4
},
{
    name: '海南',
    value: 22
},
{
    name: '台湾',
    value: 3
},
{
    name: '香港',
    value: 5
},
{
    name: '澳门',
    value: 5
}
];
const mapChartData3 = {
    textStyle:{

    },
	title: {
        text: '',
        textStyle:{
            color:"#000"
        }
	},
    tooltip: {
        triggerOn: "click",
        formatter: function(e, t, n) {
            return .5 == e.value ? e.name + "：有疑似病例" : e.seriesName + "<br />" + e.name + "：" + e.value
        }
    },
    visualMap: {
        min: 0,
        max: 1000,
        left: 26,
        bottom: 40,
        showLabel: !0,
        text: ["高", "低"],
        textStyle:{
        },
        pieces: [{
            gt: 100,
            label: "> 100 人",
            color: "#7f1100"
        }, {
            gte: 10,
            lte: 100,
            label: "10 - 100 人",
            color: "#ff5428"
        }, {
            gte: 1,
            lt: 10,
            label: "1 - 9 人",
            color: "#ff8c71"
        }, {
            gt: 0,
            lt: 1,
            label: "疑似",
            color: "#ffd768"
        }, {
            value: 0,
            color: "#ccc"
        }],
        show: !0
    },
    geo: {
        map: "china",
        roam: !1,
        scaleLimit: {
            min: 1,
            max: 2
        },
        aspectScale: 0.65, //长宽比
        zoom: 1.23,
        top: 60,
        label: {
            normal: {
                show: !0,
                fontSize: "14",
                color: "rgba(0,0,0,0.7)"
                //color: "rgba(136,206,250,1)"
            }
        },
        itemStyle: {
            normal: {
                //shadowBlur: 50,
                //shadowColor: 'rgba(0, 0, 0, 0.2)',
                borderColor: "rgba(0, 0, 0, 0.2)",
                color: 'lightskyblue'
                //borderColor: "rgba(136,206,250,1)"
            },
            emphasis: {
                areaColor: "#f2d5ad",
                //areaColor: "lightskyblue",
                shadowOffsetX: 0,
                shadowOffsetY: 0,
                borderWidth: 0
            },
        },
    },
    series: [
        {
        name: "确诊病例",
        type: "map",
        geoIndex: 0,
        data: window.dataList
      }
   ]
}

//折线图
const dayChartData = {
    textStyle:{

    },
    title: {
	    text: '',
        left: 'center',
        top:"20px",
        textStyle:{
            color:"#000"
        }
    },
    legend: {
        data: [],
        textStyle:{}
    },
	xAxis: {
		type: 'category',
        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
        axisLine:{
            lineStyle:{
               
            }
        } 
	},
	yAxis: {
        type: 'value',
        axisLine:{
            lineStyle:{
               
            }
        } 
	},
	series: [{
		data: [820, 932, 901, 934, 1290, 1330, 1320],
        type: 'line',
        smooth:"0"
	}]
};
const dayChartData2 = {
    textStyle:{

    },
    title: {
	    text: '',
        left: 'center',
        top:"20px",
        textStyle:{
            color:"#000"
        }
	},
	xAxis: {
		type: 'category',
		boundaryGap: false,
        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
        axisLine:{
            lineStyle:{
               
            }
        } 
	},
	yAxis: {
        type: 'value',
        axisLine:{
            lineStyle:{
               
            }
        } 
	},
	series: [{
		data: [820, 932, 901, 934, 1290, 1330, 1320],
		type: 'line',
        areaStyle: {},
        smooth:"0"
	}]
};
const dayChartData3 = {
    textStyle:{

    },
	title: {
        text: '折线图堆叠',
        left: 'center',
        top:"20px",
        textStyle:{
            color:"#000"
        }
    },
    tooltip: {
        trigger: 'axis'
    },
    legend: {
        data: ['邮件营销', '联盟广告', '视频广告', '直接访问', '搜索引擎'],
        textStyle:{}
    },
    grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
    },
    toolbox: {
        feature: {
            saveAsImage: {}
        }
    },
    xAxis: {
        type: 'category',
        boundaryGap: false,
        data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
        axisLine:{
            lineStyle:{
               
            }
        } 
    },
    yAxis: {
        type: 'value',
        axisLine:{
            lineStyle:{
               
            }
        } 
    },
    series: [
        {
            name: '邮件营销',
            type: 'line',
            stack: '总量',
            smooth:"0",
            data: [120, 132, 101, 134, 90, 230, 210]
        },
        {
            name: '联盟广告',
            type: 'line',
            stack: '总量',
            smooth:"0",
            data: [220, 182, 191, 234, 290, 330, 310]
        },
        {
            name: '视频广告',
            type: 'line',
            stack: '总量',
            smooth:"0",
            data: [150, 232, 201, 154, 190, 330, 410]
        },
        {
            name: '直接访问',
            type: 'line',
            stack: '总量',
            smooth:"0",
            data: [320, 332, 301, 334, 390, 330, 320]
        },
        {
            name: '搜索引擎',
            type: 'line',
            stack: '总量',
            smooth:"0",
            data: [820, 932, 901, 934, 1290, 1330, 1320]
        }
    ]
};
const dayChartData4 = {
    textStyle:{
        
    },
	title: {
        text: '堆叠区域图',
        left: 'center',
        top:"20px",
        textStyle:{
            color:"#000"
        }
    },
    tooltip: {
        trigger: 'axis',
        axisPointer: {
            type: 'cross',
            label: {
                backgroundColor: '#6a7985'
            }
        }
    },
    legend: {
        data: ['邮件营销', '联盟广告', '视频广告', '直接访问', '搜索引擎'],
        textStyle:{}
    },
    toolbox: {
        feature: {
            saveAsImage: {}
        }
    },
    grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
    },
    xAxis: [
        {
            type: 'category',
            boundaryGap: false,
            data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
            axisLine:{
                lineStyle:{
                   
                }
            } 
        }
    ],
    yAxis: [
        {
            type: 'value',
            axisLine:{
                lineStyle:{
                   
                }
            } 
        }
    ],
    series: [
        {
            name: '邮件营销',
            type: 'line',
            stack: '总量',
            areaStyle: {},
            smooth:"0",
            data: [120, 132, 101, 134, 90, 230, 210]
        },
        {
            name: '联盟广告',
            type: 'line',
            stack: '总量',
            areaStyle: {},
            smooth:"0",
            data: [220, 182, 191, 234, 290, 330, 310]
        },
        {
            name: '视频广告',
            type: 'line',
            stack: '总量',
            areaStyle: {},
            smooth:"0",
            data: [150, 232, 201, 154, 190, 330, 410]
        },
        {
            name: '直接访问',
            type: 'line',
            stack: '总量',
            areaStyle: {},
            smooth:"0",
            data: [320, 332, 301, 334, 390, 330, 320]
        },
        {
            name: '搜索引擎',
            type: 'line',
            stack: '总量',
            label: {
                normal: {
                    show: true,
                    position: 'top'
                }
            },
            areaStyle: {},
            smooth:"0",
            data: [820, 932, 901, 934, 1290, 1330, 1320]
        }
    ]
};
const dayChartData5  = {
    textStyle:{
        
    },
    title:{
        text:"",
        left: 'center',
        top:"20px",
        textStyle:{
            color:"#000"
        }
    },
	xAxis: {
		type: 'category',
        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
        axisLine:{
            lineStyle:{
               
            }
        } 
	},
	yAxis: {
        type: 'value',
        axisLine:{
            lineStyle:{
               
            }
        } 
	},
	series: [{
		data: [820, 932, 901, 934, 1290, 1330, 1320],
		type: 'line',
		smooth: false
	}]
};
//柱状图开始
const barChartData = {
    textStyle:{

    },
    title:{
        top:"20px",
        textStyle:{
            color:"#000"
        }
    },
	color: ['#3398DB'],
	tooltip: {
		trigger: 'axis',
		axisPointer: {            // 坐标轴指示器，坐标轴触发有效
			type: 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
		}
	},
	grid: {
		left: '3%',
		right: '4%',
		bottom: '3%',
		containLabel: true
	},
	xAxis: [
		{
			type: 'category',
			data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
			axisTick: {
				alignWithLabel: true
            },
            axisLine:{
                lineStyle:{
                   
                }
            } 
		}
	],
	yAxis: [
		{
            type: 'value',
            axisLine:{
                lineStyle:{
                   
                }
            } 
		}
	],
	series: [
		{
			name: '直接访问',
			type: 'bar',
			barWidth: '60%',
			data: [10, 52, 200, 334, 390, 330, 220]
		}
	]
};
const barChartData2 = {
    textStyle:{

    },
    title:{
        top:"20px",
        textStyle:{
            color:"#000"
        }
    },
	legend: {
        textStyle:{}
    },
	tooltip: {
        trigger: 'axis',
		axisPointer: {            // 坐标轴指示器，坐标轴触发有效
			type: 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
		}
	},
	dataset: {
		source: [
			['product', '2015', '2016', '2017'],
			['Matcha Latte', 43.3, 85.8, 93.7],
			['Milk Tea', 83.1, 73.4, 55.1],
			['Cheese Cocoa', 86.4, 65.2, 82.5],
			['Walnut Brownie', 72.4, 53.9, 39.1]
		]
	},
	xAxis: {
        type: 'category',
        axisLine:{
            lineStyle:{
            
            }
        } 
    },
	yAxis: {
        type:"value",
        axisLine:{
            lineStyle:{
               
            }
        } 
    },
	// Declare several bar series, each will be mapped
	// to a column of dataset.source by default.
	series: [
		{type: 'bar'},
		{type: 'bar'},
		{type: 'bar'}
	]
};
const barChartData3 = {
    textStyle:{

    },
    title:{
        top:"20px",
        textStyle:{
            color:"#000"
        }
    },
	tooltip: {
		trigger: 'axis',
		axisPointer: {            // 坐标轴指示器，坐标轴触发有效
			type: 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
		}
	},
	legend: {
        data: ['利润', '支出', '收入'],
        textStyle:{}
	},
	grid: {
		left: '3%',
		right: '4%',
		bottom: '3%',
		containLabel: true
	},
	xAxis: [
		{
            type: 'value',
            axisLine:{
                lineStyle:{
                
                }
            } 
		}
	],
	yAxis: [
		{
			type: 'category',
			axisTick: {
				show: false
			},
            data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
            axisLine:{
                lineStyle:{
                
                }
            } 
		}
	],
	series: [
		{
			name: '利润',
			type: 'bar',
			label: {
				show: true,
				position: 'inside'
			},
			data: [200, 170, 240, 244, 200, 220, 210]
		},
		{
			name: '收入',
			type: 'bar',
			stack: '总量',
			label: {
				show: true
			},
			data: [320, 302, 341, 374, 390, 450, 420]
		},
		{
			name: '支出',
			type: 'bar',
			stack: '总量',
			label: {
				show: true,
				position: 'left'
			},
			data: [-120, -132, -101, -134, -190, -230, -210]
		}
	]
};
const barChartData4 = {
    textStyle:{

    },
    title:{
        top:"20px",
        textStyle:{
            color:"#000"
        }
    },
	tooltip: {
		trigger: 'axis',
		axisPointer: {
			type: 'cross',
			crossStyle: {
				color: '#999'
			}
		}
	},
	toolbox: {
		feature: {
			dataView: {show: true, readOnly: false},
			magicType: {show: true, type: ['line', 'bar']},
			restore: {show: true},
			saveAsImage: {show: true}
		}
	},
	legend: {
        data: ['蒸发量', '降水量', '平均温度'],
        textStyle:{}
	},
	xAxis: [
		{
			type: 'category',
			data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
            axisLine:{
                lineStyle:{
                
                }
            } 
		}
	],
	yAxis: [
		{
			type: 'value',
			name: '',
			// min: 0,
			// max: 250,
			// interval: 50,
			// axisLabel: {
			// 	formatter: '{value} ml'
            // },
            axisLine:{
                lineStyle:{
                
                }
            } 
		},
		{
			type: 'value',
			name: '',
			// min: 0,
			// max: 25,
			// interval: 5,
			// axisLabel: {
			// 	formatter: '{value} °C'
            // },
            axisLine:{
                lineStyle:{
                
                }
            } 
		}
	],
	series: [
		{
			name: '蒸发量',
			type: 'bar',
			data: [2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3]
		},
		{
			name: '降水量',
			type: 'bar',
			data: [2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3]
		},
		{
			name: '平均温度',
			type: 'line',
			yAxisIndex: 1,
			data: [2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]
		}
	]
};
const barChartData5 = {
    textStyle:{

    },
    title:{
        top:"20px",
        textStyle:{
            color:"#000"
        }
    },
	tooltip: {
		trigger: 'axis',
		axisPointer: {            // 坐标轴指示器，坐标轴触发有效
			type: 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
		}
	},
	legend: {
        data: ['直接访问', '邮件营销', '联盟广告', '视频广告', '搜索引擎'],
        textStyle:{}
	},
	grid: {
		left: '3%',
		right: '4%',
		bottom: '3%',
		containLabel: true
	},
	xAxis: {
        type: 'value',
        axisLine:{
            lineStyle:{
            
            }
        } 
	},
	yAxis: {
		type: 'category',
        data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
        axisLine:{
            lineStyle:{
            
            }
        } 
	},
	series: [
		{
			name: '直接访问',
			type: 'bar',
			stack: '总量',
			label: {
				show: true,
				position: 'insideRight'
			},
			data: [320, 302, 301, 334, 390, 330, 320]
		},
		{
			name: '邮件营销',
			type: 'bar',
			stack: '总量',
			label: {
				show: true,
				position: 'insideRight'
			},
			data: [120, 132, 101, 134, 90, 230, 210]
		},
		{
			name: '联盟广告',
			type: 'bar',
			stack: '总量',
			label: {
				show: true,
				position: 'insideRight'
			},
			data: [220, 182, 191, 234, 290, 330, 310]
		},
		{
			name: '视频广告',
			type: 'bar',
			stack: '总量',
			label: {
				show: true,
				position: 'insideRight'
			},
			data: [150, 212, 201, 154, 190, 330, 410]
		},
		{
			name: '搜索引擎',
			type: 'bar',
			stack: '总量',
			label: {
				show: true,
				position: 'insideRight'
			},
			data: [820, 832, 901, 934, 1290, 1330, 1320]
		}
	]
};
//柱状图结束
// 饼状图开始
const pieChartData = {
    textStyle:{

    },
	title: {
	    text: '某站点用户访问来源',
        left: 'center',
        top:"20px",
        textStyle:{
            color:"#000"
        }
	},
	tooltip: {
		trigger: 'item',
		formatter: '{a} <br/>{b} : {c} ({d}%)'
	},
	legend: {
	    orient: 'vertical',
	    left: 'left',
	    top:'20',
        data: ['直接访问', '邮件营销', '联盟广告', '视频广告', '搜索引擎'],
        textStyle:{}
	},
	series: [
		{
			name: '访问来源',
			type: 'pie',
			radius: '55%',
			center: ['50%', '60%'],
			data: [
				{value: 335, name: '直接访问'},
				{value: 310, name: '邮件营销'},
				{value: 234, name: '联盟广告'},
				{value: 135, name: '视频广告'},
				{value: 1548, name: '搜索引擎'}
			],
			emphasis: {
				itemStyle: {
					shadowBlur: 10,
					shadowOffsetX: 0,
					shadowColor: 'rgba(0, 0, 0, 0.5)'
				}
			}
		}
	]
};
const pieChartData2 = {
    textStyle:{

    },
    title:{
        text: '',
        left: 'center',
        top:"20px",
        textStyle:{
            color:"#000"
        }
    },
	tooltip: {
		trigger: 'item',
		formatter: '{a} <br/>{b}: {c} ({d}%)'
	},
	legend: {
		orient: 'vertical',
		left: 10,
        data: ['直接访问', '邮件营销', '联盟广告', '视频广告', '搜索引擎'],
        textStyle:{}
	},
	series: [
		{
			name: '访问来源',
			type: 'pie',
			radius: ['50%', '70%'],
			avoidLabelOverlap: false,
			label: {
				show: false,
				position: 'center'
			},
			emphasis: {
				label: {
					show: true,
					fontSize: '30',
					fontWeight: 'bold'
				}
			},
			labelLine: {
				show: false
			},
			data: [
				{value: 335, name: '直接访问'},
				{value: 310, name: '邮件营销'},
				{value: 234, name: '联盟广告'},
				{value: 135, name: '视频广告'},
				{value: 1548, name: '搜索引擎'}
			]
		}
	]
};
function genData(count) {
	var nameList = [
		'赵', '钱', '孙', '李', '周', '吴', '郑', '王', '冯', '陈', '褚', '卫', '蒋', '沈', '韩', '杨', '朱', '秦', '尤', '许', '何', '吕', '施', '张', '孔', '曹', '严', '华', '金', '魏', '陶', '姜', '戚', '谢', '邹', '喻', '柏', '水', '窦', '章', '云', '苏', '潘', '葛', '奚', '范', '彭', '郎', '鲁', '韦', '昌', '马', '苗', '凤', '花', '方', '俞', '任', '袁', '柳', '酆', '鲍', '史', '唐', '费', '廉', '岑', '薛', '雷', '贺', '倪', '汤', '滕', '殷', '罗', '毕', '郝', '邬', '安', '常', '乐', '于', '时', '傅', '皮', '卞', '齐', '康', '伍', '余', '元', '卜', '顾', '孟', '平', '黄', '和', '穆', '萧', '尹', '姚', '邵', '湛', '汪', '祁', '毛', '禹', '狄', '米', '贝', '明', '臧', '计', '伏', '成', '戴', '谈', '宋', '茅', '庞', '熊', '纪', '舒', '屈', '项', '祝', '董', '梁', '杜', '阮', '蓝', '闵', '席', '季', '麻', '强', '贾', '路', '娄', '危'
	];
	var legendData = [];
	var seriesData = [];
	var selected = {};
	for (var i = 0; i < count; i++) {
		name = Math.random() > 0.65
			? makeWord(4, 1) + '·' + makeWord(3, 0)
			: makeWord(2, 1);
		//legendData.push(name);
		seriesData.push({
			name: name,
			value: Math.round(Math.random() * 100000)
		});
		selected[name] = i < 6;
	}

	return {
		legendData: legendData,
		seriesData: seriesData,
		selected: selected
	};

	function makeWord(max, min) {
		var nameLen = Math.ceil(Math.random() * max + min);
		var name = [];
		for (var i = 0; i < nameLen; i++) {
			name.push(nameList[Math.round(Math.random() * nameList.length - 1)]);
		}
		return name.join('');
	}
}
const pieChartData3 = {
    textStyle:{

    },
	title: {
        text: '',
        left: 'center',
        top:"30px",
        textStyle:{
            color:"#000"
        }
	},
	tooltip: {
	    trigger: 'item',
	    formatter: '{a} <br/>{b} : {c} ({d}%)'
	},
	legend: {
		type: 'scroll',
		orient: 'vertical',
		right: 10,
		top: 20,
        bottom: 20,
        textStyle:{},
		data: genData(10).legendData,

		selected: genData(10).selected
	},
	series: [
		{
			name: '姓名',
			type: 'pie',
			radius: '55%',
			center: ['40%', '50%'],
			data: genData(10).seriesData,
			emphasis: {
				itemStyle: {
					shadowBlur: 10,
					shadowOffsetX: 0,
					shadowColor: 'rgba(0, 0, 0, 0.5)'
				}
			}
		}
	]
}




const styleJson = [{
    "featureType": "water",　　//水
    "elementType": "all",　　　　//feature是特征，element是元素
    "stylers": {
        "color": "#044161"
    }
},
{
    "featureType": "land",　　//陆地
    "elementType": "all",
    "stylers": {
        "color": "#004981"
    }
},
{
    "featureType": "boundary",　　//边界
    "elementType": "geometry",
    "stylers": {
        "color": "#064f85"
    }
},
{
    "featureType": "railway",　　//铁路
    "elementType": "all",
    "stylers": {
        "visibility": "off"
    }
},
{
    "featureType": "highway",　　//高速及国道
    "elementType": "geometry",　　//几何（图形）
    "stylers": {
        "color": "#004981"
    }
},
{
    "featureType": "highway",　　
    "elementType": "geometry.fill",　　//几何填充
    "stylers": {
        "color": "#005b96",
        "lightness": 1
    }
},
{
    "featureType": "highway",
    "elementType": "labels",　　　　//标签
    "stylers": {
        "visibility": "off"
    }
},
{
    "featureType": "arterial",　　//城市主路
    "elementType": "geometry",
    "stylers": {
        "color": "#004981"
    }
},
{
    "featureType": "arterial",
    "elementType": "geometry.fill",
    "stylers": {
        "color": "#00508b"
    }
},
{
    "featureType": "poi",　　//定位
    "elementType": "all",
    "stylers": {
        "visibility": "off"
    }
},
{
    "featureType": "green",　　//绿地
    "elementType": "all",
    "stylers": {
        "color": "#056197",
        "visibility": "off"
    }
},
{
    "featureType": "subway",　　//地铁
    "elementType": "all",
    "stylers": {
        "visibility": "off"
    }
},
{
    "featureType": "manmade",//人造区域
    "elementType": "all",
    "stylers": {
        "visibility": "off"
    }
},
{
    "featureType": "local",//普通道路
    "elementType": "all",
    "stylers": {
        "visibility": "off"
    }
},
{
    "featureType": "arterial",
    "elementType": "labels",
    "stylers": {
        "visibility": "off"
    }
},
{
    "featureType": "boundary",
    "elementType": "geometry.fill",
    "stylers": {
        "color": "#029fd4"
    }
},
{
    "featureType": "building",　　//建筑物
    "elementType": "all",
    "stylers": {
        "color": "#1a5787"
    }
},
{
    "featureType": "label",//标签
    "elementType": "all",
    "stylers": {
        "visibility": "off"
    }
}
]

const styleJson2 = [
    {
"featureType": "water",
"elementType": "geometry",
"stylers": {
    "visibility": "on",
    "color": "#113549ff"
}
}, 
{
    "featureType": "land",
    "elementType": "geometry",
    "stylers": {
        "visibility": "on",
        "color": "#091220ff"
    }
    }, 
{
"featureType": "green",
"elementType": "geometry",
"stylers": {
    "visibility": "on",
    "color": "#0e1b30ff"
}
}
// {
// "featureType": "building",
// "elementType": "geometry",
// "stylers": {
//     "visibility": "on"
// }
// }, {
// "featureType": "building",
// "elementType": "geometry.fill",
// "stylers": {
//     "color": "#ffffffb3"
// }
// }, {
// "featureType": "building",
// "elementType": "geometry.stroke",
// "stylers": {
//     "color": "#dadadab3"
// }
// }
, {
"featureType": "subwaystation",
"elementType": "geometry",
"stylers": {
    "visibility": "on",
    "color": "#b15454B2"
}
}, {
"featureType": "education",
"elementType": "geometry",
"stylers": {
    "visibility": "on",
    "color": "#e4f1f1ff"
}
}, {
"featureType": "medical",
"elementType": "geometry",
"stylers": {
    "visibility": "on",
    "color": "#f0dedeff"
}
}, {
"featureType": "scenicspots",
"elementType": "geometry",
"stylers": {
    "visibility": "on",
    "color": "#e2efe5ff"
}
}, {
"featureType": "highway",
"elementType": "geometry",
"stylers": {
    "visibility": "on",
    "weight": 4
}
}, {
"featureType": "highway",
"elementType": "geometry.fill",
"stylers": {
    "color": "#f7c54dff"
}
}, {
"featureType": "highway",
"elementType": "geometry.stroke",
"stylers": {
    "color": "#fed669ff"
}
}, {
"featureType": "highway",
"elementType": "labels",
"stylers": {
    "visibility": "on"
}
}, {
"featureType": "highway",
"elementType": "labels.text.fill",
"stylers": {
    "color": "#8f5a33ff"
}
}, {
"featureType": "highway",
"elementType": "labels.text.stroke",
"stylers": {
    "color": "#ffffffff"
}
}, {
"featureType": "highway",
"elementType": "labels.icon",
"stylers": {
    "visibility": "on"
}
}, {
"featureType": "arterial",
"elementType": "geometry",
"stylers": {
    "visibility": "on",
    "weight": 2
}
}, {
"featureType": "arterial",
"elementType": "geometry.fill",
"stylers": {
    "color": "#d8d8d8ff"
}
}, {
"featureType": "arterial",
"elementType": "geometry.stroke",
"stylers": {
    "color": "#ffeebbff"
}
}, {
"featureType": "arterial",
"elementType": "labels",
"stylers": {
    "visibility": "on"
}
}, {
"featureType": "arterial",
"elementType": "labels.text.fill",
"stylers": {
    "color": "#525355ff"
}
}, {
"featureType": "arterial",
"elementType": "labels.text.stroke",
"stylers": {
    "color": "#ffffffff"
}
}, {
"featureType": "local",
"elementType": "geometry",
"stylers": {
    "visibility": "on",
    "weight": 1
}
}, {
"featureType": "local",
"elementType": "geometry.fill",
"stylers": {
    "color": "#d8d8d8ff"
}
}, {
"featureType": "local",
"elementType": "geometry.stroke",
"stylers": {
    "color": "#ffffffff"
}
}, {
"featureType": "local",
"elementType": "labels",
"stylers": {
    "visibility": "on"
}
}, {
"featureType": "local",
"elementType": "labels.text.fill",
"stylers": {
    "color": "#979c9aff"
}
}, {
"featureType": "local",
"elementType": "labels.text.stroke",
"stylers": {
    "color": "#ffffffff"
}
}, {
"featureType": "railway",
"elementType": "geometry",
"stylers": {
    "visibility": "on",
    "weight": 1
}
}, {
"featureType": "railway",
"elementType": "geometry.fill",
"stylers": {
    "color": "#123c52ff"
}
}, {
"featureType": "railway",
"elementType": "geometry.stroke",
"stylers": {
    "color": "#12223dff"
}
}, {
"featureType": "subway",
"elementType": "geometry",
"stylers": {
    "visibility": "on",
    "weight": 1
}
}, {
"featureType": "subway",
"elementType": "geometry.fill",
"stylers": {
    "color": "#d8d8d8ff"
}
}, {
"featureType": "subway",
"elementType": "geometry.stroke",
"stylers": {
    "color": "#ffffff00"
}
}, {
"featureType": "subway",
"elementType": "labels",
"stylers": {
    "visibility": "on"
}
}, {
"featureType": "subway",
"elementType": "labels.text.fill",
"stylers": {
    "color": "#979c9aff"
}
}, {
"featureType": "subway",
"elementType": "labels.text.stroke",
"stylers": {
    "color": "#ffffffff"
}
}, {
"featureType": "continent",
"elementType": "labels",
"stylers": {
    "visibility": "on"
}
}, {
"featureType": "continent",
"elementType": "labels.icon",
"stylers": {
    "visibility": "on"
}
}, {
"featureType": "continent",
"elementType": "labels.text.fill",
"stylers": {
    "color": "#333333ff"
}
}, {
"featureType": "continent",
"elementType": "labels.text.stroke",
"stylers": {
    "color": "#ffffffff"
}
}, {
"featureType": "city",
"elementType": "labels.icon",
"stylers": {
    "visibility": "on"
}
}, {
"featureType": "city",
"elementType": "labels",
"stylers": {
    "visibility": "on"
}
}, {
"featureType": "city",
"elementType": "labels.text.fill",
"stylers": {
    "color": "#454d50ff"
}
}, {
"featureType": "city",
"elementType": "labels.text.stroke",
"stylers": {
    "color": "#ffffffff"
}
}, {
"featureType": "town",
"elementType": "labels.icon",
"stylers": {
    "visibility": "on"
}
}, {
"featureType": "town",
"elementType": "labels",
"stylers": {
    "visibility": "on"
}
}, {
"featureType": "town",
"elementType": "labels.text.fill",
"stylers": {
    "color": "#454d50ff"
}
}, {
"featureType": "town",
"elementType": "labels.text.stroke",
"stylers": {
    "color": "#ffffffff"
}
}, {
"featureType": "road",
"elementType": "geometry.fill",
"stylers": {
    "color": "#12223dff"
}
}, {
"featureType": "poilabel",
"elementType": "labels",
"stylers": {
    "visibility": "on"
}
}, {
"featureType": "districtlabel",
"elementType": "labels",
"stylers": {
    "visibility": "off"
}
}, {
"featureType": "road",
"elementType": "geometry",
"stylers": {
    "visibility": "on"
}
}, {
"featureType": "road",
"elementType": "labels",
"stylers": {
    "visibility": "off"
}
}, {
"featureType": "road",
"elementType": "geometry.stroke",
"stylers": {
    "color": "#ffffff00"
}
}, {
"featureType": "district",
"elementType": "labels",
"stylers": {
    "visibility": "off"
}
}, {
"featureType": "poilabel",
"elementType": "labels.icon",
"stylers": {
    "visibility": "off"
}
}, {
"featureType": "poilabel",
"elementType": "labels.text.fill",
"stylers": {
    "color": "#2dc4bbff"
}
}, {
"featureType": "poilabel",
"elementType": "labels.text.stroke",
"stylers": {
    "color": "#ffffff00"
}
}, {
"featureType": "manmade",
"elementType": "geometry",
"stylers": {
    "color": "#12223dff"
}
}, {
"featureType": "districtlabel",
"elementType": "labels.text.stroke",
"stylers": {
    "color": "#ffffffff"
}
}, {
"featureType": "entertainment",
"elementType": "geometry",
"stylers": {
    "color": "#ffffffff"
}
}, {
"featureType": "shopping",
"elementType": "geometry",
"stylers": {
    "color": "#12223dff"
}
}
];



const styleJson3 = [{
    "featureType": "water",　　//水
    "elementType": "all",　　　　//feature是特征，element是元素
    "stylers": {
        "color": "#113549ff"
    }
},
{
    "featureType": "land",　　//陆地
    "elementType": "all",
    "stylers": {
        "color": "#091220ff"
    }
},
{
    "featureType": "boundary",　　//边界
    "elementType": "geometry",
    "stylers": {
        "color": "#ffffffb3"
    }
},
{
    "featureType": "railway",　　//铁路
    "elementType": "all",
    "stylers": {
        "visibility": "off"
    }
},
{
    "featureType": "highway",　　//高速及国道
    "elementType": "geometry",　　//几何（图形）
    "stylers": {
        "color": "#b15454B2"
    }
},
{
    "featureType": "highway",　　
    "elementType": "geometry.fill",　　//几何填充
    "stylers": {
        "color": "#ffffffff",
        "lightness": 1
    }
},
{
    "featureType": "highway",
    "elementType": "labels",　　　　//标签
    "stylers": {
        "visibility": "on"
    }
},
{
    "featureType": "arterial",　　//城市主路
    "elementType": "geometry",
    "stylers": {
        "color": "#004981"
    }
},
{
    "featureType": "arterial",
    "elementType": "geometry.fill",
    "stylers": {
        "color": "#123c52ff"
    }
},
{
    "featureType": "poi",　　//定位
    "elementType": "all",
    "stylers": {
        "visibility": "off"
    }
},
{
    "featureType": "green",　　//绿地
    "elementType": "all",
    "stylers": {
        "color": "#0e1b30ff",
        "visibility": "off"
    }
},
{
    "featureType": "subway",　　//地铁
    "elementType": "all",
    "stylers": {
        "visibility": "on",
        "color":"#fff"
    }
},
{
    "featureType": "manmade",//人造区域
    "elementType": "all",
    "stylers": {
        "visibility": "on",
        "color":"#fff"
    }
},
{
    "featureType": "local",//普通道路
    "elementType": "all",
    "stylers": {
        "visibility": "off",
        "color":"#fff"
    }
},
{
    "featureType": "arterial",
    "elementType": "labels",
    "stylers": {
        "visibility": "on",
        "color":"#000"
    }
},
{
    "featureType": "boundary",
    "elementType": "geometry.fill",
    "stylers": {
        "color": "#029fd4"
    }
},
{
    "featureType": "building",　　//建筑物
    "elementType": "all",
    "stylers": {
        "color": "#fed669ff"
    }
},
{
    "featureType": "label",//标签
    "elementType": "all",
    "stylers": {
        "visibility": "on"
    }
}
]
export default {
	dayChartData:dayChartData,
	dayChartData2:dayChartData2,
	dayChartData3:dayChartData3,
	dayChartData4:dayChartData4,
	dayChartData5:dayChartData5,
	
	barChartData:barChartData,
	barChartData2:barChartData2,
	barChartData3:barChartData3,
	barChartData4:barChartData4,
	barChartData5:barChartData5,

	pieChartData:pieChartData,
	pieChartData2:pieChartData2,
	pieChartData3:pieChartData3,

	scatterChartData:scatterChartData,
	scatterChartData2:scatterChartData2,
	scatterChartData3:scatterChartData3,
	scatterChartData4:scatterChartData4,
	scatterChartData5:scatterChartData5,
	scatterChartData6:scatterChartData6,
	mapChartData:mapChartData,
    //mapChartData2:mapChartData2,
    mapChartData3:mapChartData3,
	funnelPlotChartData:funnelPlotChartData,
    funnelPlotChartData2:funnelPlotChartData2,
    
    styleJson:styleJson,
    styleJson2:styleJson2,
    styleJson3:styleJson3
}